Vue.filter('datetime', function(value) {
	if(value == null || value == "" || value == undefined){
		return "";
	}
	var date = new Date(value);
	Y = date.getFullYear(), m = date.getMonth() + 1, d = date.getDate(), H = date.getHours(), i = date.getMinutes(), s = date.getSeconds();
	if (m < 10) {
		m = '0' + m;
	}
	if (d < 10) {
		d = '0' + d;
	}
	if (H < 10) {
		H = '0' + H;
	}
	if (i < 10) {
		i = '0' + i;
	}
	if (s < 10) {
		s = '0' + s;
	}
	var t = Y + '-' + m + '-' + d + ' ' + H + ':' + i + ':' + s;
	return t;
})

Vue.filter('date', function(value) {
	if(value == null || value == "" || value == undefined){
		return "";
	}
	var date = new Date(value);
	Y = date.getFullYear(), m = date.getMonth() + 1, d = date.getDate(), H = date.getHours(), i = date.getMinutes(), s = date.getSeconds();
	if (m < 10) {
		m = '0' + m;
	}
	if (d < 10) {
		d = '0' + d;
	}
	if (H < 10) {
		H = '0' + H;
	}
	if (i < 10) {
		i = '0' + i;
	}
	if (s < 10) {
		s = '0' + s;
	}
	var t = Y + '-' + m + '-' + d;
	return t;
})

Vue.filter('time', function(value) {
	if(value == null || value == "" || value == undefined){
		return "";
	}
	var date = new Date(value);
	Y = date.getFullYear(), m = date.getMonth() + 1, d = date.getDate(), H = date.getHours(), i = date.getMinutes(), s = date.getSeconds();
	if (m < 10) {
		m = '0' + m;
	}
	if (d < 10) {
		d = '0' + d;
	}
	if (H < 10) {
		H = '0' + H;
	}
	if (i < 10) {
		i = '0' + i;
	}
	if (s < 10) {
		s = '0' + s;
	}
	var t =  H + ':' + i + ':' + s;
	return t;
})

Vue.filter('yearMonth', function(value) {
	if(value == null || value == "" || value == undefined){
		return "";
	}
	var date = new Date(value);
	Y = date.getFullYear(), m = date.getMonth() + 1, d = date.getDate(), H = date.getHours(), i = date.getMinutes(), s = date.getSeconds();
	if (m < 10) {
		m = '0' + m;
	}
	if (d < 10) {
		d = '0' + d;
	}
	if (H < 10) {
		H = '0' + H;
	}
	if (i < 10) {
		i = '0' + i;
	}
	if (s < 10) {
		s = '0' + s;
	}
	var t =  Y +'-'+ m;
	return t;
})
Vue.filter('numberFormat', function(value) {
	return value.toFixed(2);
})